// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Character/StarrySkyCharacterBase.h"
#include "Interaction/EnemyInterface.h"
#include "UI/WidgetController/OverlayWidgetController.h"
#include "EnemyCharacter.generated.h"

class UWidgetComponent;
/**
 * 
 */
UCLASS()
class STARRYSKY_API AEnemyCharacter : public AStarrySkyCharacterBase,public IEnemyInterface
{
	GENERATED_BODY()
public:
	AEnemyCharacter();
	/** Interface */
	virtual  void HighlightActor() override;
	virtual  void UnHighlightActor()  override;
	/** End Interface */

	/** Combat Interface */
	virtual int32 GetPlayerLevel() override;
	/** End Combat Interface */
	
	//属性广播代理
	UPROPERTY(BlueprintAssignable)
	FOnAttributeChangedSingature OnHealthChanged;
	UPROPERTY(BlueprintAssignable)
	FOnAttributeChangedSingature OnMaxHealthChanged;
protected:
	virtual  void BeginPlay() override;
	virtual void InitAbilityActorInfo() override;
	UPROPERTY(EditAnywhere,BlueprintReadOnly,Category="Character Class Defaults")
	int32 Level=1;

	//添加小部件组件
	UPROPERTY(VisibleAnywhere,BlueprintReadOnly,Category="Widget")
	TObjectPtr<UWidgetComponent> HealthBar;
};
